package Service.Impl.SignImpl;

import Dao.Sign.DeviceArrangeLrDao;
import Model.SignModel.DeviceArrangeLr;
import Service.DeviceArrangeLrService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("DeviceArrangeLrService")
public class DeviceArrangeLrServiceImpl implements DeviceArrangeLrService {

    @Autowired
    private DeviceArrangeLrDao deviceArrangeLrDao;

    @Override
    public List<DeviceArrangeLr> getDeviceArrangeLrList(DeviceArrangeLr deviceArrangeLr){
        List<DeviceArrangeLr> list = deviceArrangeLrDao.getDeviceArrangeLrList(deviceArrangeLr);
        System.out.println("[Service层：获取老人的发放设备信息！]");
        return list;
    }

    @Override
    public void deleteDeviceArrangeLr(int id){
        deviceArrangeLrDao.deleteDeviceArrangeLr(id);
        System.out.println("[Service层：删除老人的发放设备信息！]");
    }

    @Override
    public void updateDeviceArrangeLr(DeviceArrangeLr deviceArrangeLr){
        deviceArrangeLrDao.updateDeviceArrangeLr(deviceArrangeLr);
        System.out.println("[Service层：更新老人的发放设备信息！]");
    }

    @Override
    public void addDeviceArrangeLr(DeviceArrangeLr deviceArrangeLr){
        deviceArrangeLrDao.addDeviceArrangeLr(deviceArrangeLr);
        System.out.println("[Service层：添加老人的发放设备信息！]");
    }
}
